package com.kcwl.carrier.domain.repository;

import com.kcwl.carrier.domain.condition.CarrierMapCondition;
import com.kcwl.carrier.domain.entity.CarrierMappingInfo;
import com.kcwl.carrier.infrastructure.repository.po.CarrierMappingPO;
import com.kcwl.carrier.interfaces.query.CarrierListQuery;
import com.kcwl.ddd.domain.entity.KcPage;
import com.kcwl.ddd.domain.repository.IBaseRepository;

import java.util.List;

/**
 * @author 刘旭超
 * @date 2022年07月11日 16:33
 * @Description
 */
public interface ICarrierMappingRepository extends IBaseRepository<CarrierMappingPO> {

    List<CarrierMappingInfo> getMappingList(CarrierMappingInfo vehicleCon);

    void deleteByVehicleId(Long vehicleId);

    CarrierMappingPO getDriverByVehicleId(Long vehicleId, Long driverId);

    Integer updateByVehicleId(CarrierMappingPO toBean);

    List<CarrierMappingInfo> queryCarrierMappingInfo(CarrierMappingInfo carrierMappingInfo);

    List<CarrierMappingPO> queryCarrierMappingInfoList(List<Long> vehicleIdList);

    void carrierUnbind(Long id);

    /**
     * 根据车辆相关条件和用户id查询映射信息
     */
    List<CarrierMappingPO> queryByVehicleParamAndUser(CarrierListQuery query);

    /**
     * 根据司机相关条件和用户id查询映射信息
     */
    List<CarrierMappingPO> queryByCarrierParamAndUser(CarrierListQuery query);

    KcPage<CarrierMappingInfo> queryMappingPageByCondition(CarrierMapCondition condition);
}
